﻿package mortal.game.view.platform
{
    import com.mui.controls.*;
    import com.mui.utils.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.item.*;

    public class PlatformVIPItemCellRender extends GCellRenderer
    {
        private var _item:BaseItem;

        public function PlatformVIPItemCellRender()
        {
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            var _loc_2:* = param1 as PlatformVIPItemGroup;
            this._item.itemCode = _loc_2.itemCode;
            this._item.amount = _loc_2.itemAmount;
            this._item.isBind = _loc_2.isBind;
            if (_loc_2.itemCode < 1000)
            {
                this._item.toolTipData = GameDefConfig.instance.getEPrictUnitName(_loc_2.itemCode) + String(_loc_2.itemAmount);
            }
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._item = UICompomentPool.getUICompoment(BaseItem);
            this._item.setItemStyle(ItemStyleConst.Small, ImagesConst.RewardItemBg, 2, 2);
            this.addChild(this._item);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._item.dispose(param1);
            this._item = null;
            super.disposeImpl(param1);
            return;
        }// end function

    }
}
